﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmProduccionArmadoNuevo.aspx.cs" Inherits="Crosland.Automotriz.Web.Vehiculos.wFrmProduccionArmadoNuevo" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel"
    TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

<asp:UpdatePanel runat="server" ID="upGeneral">
<ContentTemplate>


    <div class="main-header" style="width:100%;">
                    <div class="main-titulo">Regitro de Armado de Vehiculos</div>
    </div>

    <div class="content-form">

        <table>
     
         <tr>
            <td>
                <dx:ASPxButton ID="btnSalir" runat="server" Text="Salir" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100px" HorizontalAlign="Center" onclick="btnSalir_Click">
                     <Image Url="~/Images/logout.png">
                    </Image>
                </dx:ASPxButton>
            </td>
           
         </tr>

         </table>

         <div style="clear:both;height:15px"></div>

        <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="700px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
            GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" 
            HeaderText="Datos de Consulta" 
            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
            <HeaderStyle>
            <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
            </HeaderStyle>
            <PanelCollection>
        <dx:PanelContent runat="server" SupportsDisabledAttribute="True">

        <table style="width: 645px">
            <tr>
                <td style="width: 135px">
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Local:" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue">
                    </dx:ASPxLabel>
                </td>
                
                <td>
                    <dx:ASPxComboBox ID="cboCentro" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" Spacing="0" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <ButtonStyle Width="13px">
                        </ButtonStyle>
                    </dx:ASPxComboBox>
                </td>
                <td>
                    &nbsp;</td>
                <td style="width: 138px">
                    Equipo de Armado:</td>
                <td style="width: 220px">
                    <dx:ASPxComboBox ID="cboEquipo" runat="server" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" Spacing="0" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <ButtonStyle Width="13px">
                        </ButtonStyle>
                    </dx:ASPxComboBox>
                </td>
            </tr>
            <tr>
                <td style="width: 135px">
                    Ingrese Nro.Motor: </td>
                <td>
                    <dx:ASPxTextBox ID="txtBuscar" runat="server" Width="170px">
                    </dx:ASPxTextBox>
                </td>
                <td>
                    &nbsp;</td>
                <td style="width: 138px">
                    <dx:ASPxButton ID="btnBuscar" runat="server" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" HorizontalAlign="Center" OnClick="btnBuscar_Click" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Buscar" 
                        Width="100px">
                        <Image Url="~/Images/search.png">
                        </Image>
                    </dx:ASPxButton>
                </td>
                <td style="width: 220px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 135px">
                    (últimos 5 dígitos)</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td style="width: 138px">
                    &nbsp;</td>
                <td style="width: 220px">
                    &nbsp;</td>
            </tr>
           
        </table>
        
        </dx:PanelContent>
        </PanelCollection>
        </dx:ASPxRoundPanel>


        <div style="clear:both;height:15px"></div>

        <dx:ASPxGridView ID="dgvRegistros" runat="server" 
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" Width="1000px" 
            AutoGenerateColumns="False" ClientInstanceName="dgvRegistros" 
            KeyFieldName="NRO_LOTE" onpageindexchanged="dgvRegistros_PageIndexChanged" 
            onrowcommand="dgvRegistros_RowCommand">
            <Columns>
                <dx:GridViewDataTextColumn Caption="NroVIN" FieldName="NRO_CHASIS" 
                    VisibleIndex="1" Width="100px">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="NroMotor" FieldName="NRO_MOTOR" 
                    VisibleIndex="2" Width="100px">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Modelo" FieldName="DES_MODELO" 
                    VisibleIndex="3" Width="110px">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Color" FieldName="DES_COLOR" 
                    VisibleIndex="4" Width="80px">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Lote" FieldName="NRO_LOTE" VisibleIndex="5" 
                    Width="100px">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>

                 

                <dx:GridViewDataTextColumn Caption="Cod.Material" FieldName="COD_MATERIAL" 
                    VisibleIndex="1" Width="150px">
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>

                <dx:GridViewDataTextColumn Caption="Agregar" VisibleIndex="0" Width="45px">
                                         <DataItemTemplate>
                                             <asp:ImageButton ID="btnAgregar" runat="server" 
                                                 CommandArgument='<%# Bind("NRO_LOTE") %>' CommandName="Agregar" 
                                                 ImageUrl="~/Images/add2.png" ImageAlign="Middle" />
                                         </DataItemTemplate>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Center">
                                         </CellStyle>
                </dx:GridViewDataTextColumn> 

                <dx:GridViewDataTextColumn Caption="Cliente" FieldName="CLIENTE" 
                    VisibleIndex="7">
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>

            </Columns>
            <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <StylesPager>
                <PageNumber ForeColor="#3E4846">
                </PageNumber>
                <Summary ForeColor="#1E395B">
                </Summary>
            </StylesPager>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>

             

        </dx:ASPxGridView>

        <div style="clear:both;height:15px"></div>

        <dx:ASPxRoundPanel ID="ASPxRoundPanel2" runat="server" 
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
            GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" 
            HeaderText="Vehiculos para Armar" 
            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
            Width="900px">
            <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" 
                PaddingTop="10px" />
            <HeaderStyle>
            <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" 
                PaddingTop="3px" />
            </HeaderStyle>
            <PanelCollection>
                <dx:PanelContent runat="server" SupportsDisabledAttribute="True">

                <dx:ASPxGridView ID="gvVehiculosArmar" runat="server" 
            AutoGenerateColumns="False" ClientInstanceName="gvVehiculosArmar" 
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" Width="890px" KeyFieldName="ID" 
                        OnRowCommand="gvVehiculosArmar_RowCommand">
            <Columns>
                <dx:GridViewDataTextColumn Caption="ID" FieldName="ID" 
                    ShowInCustomizationForm="True" VisibleIndex="1">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="NroChasis" FieldName="NRO_CHASIS" 
                    ShowInCustomizationForm="True" VisibleIndex="2">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="NroMotor" FieldName="NRO_MOTOR" 
                    ShowInCustomizationForm="True" VisibleIndex="3">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Cod.Material" FieldName="COD_MATERIAL" 
                    ShowInCustomizationForm="True" VisibleIndex="4">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Modelo" FieldName="DES_MODELO" 
                    ShowInCustomizationForm="True" VisibleIndex="5">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Color" FieldName="DES_COLOR" 
                    ShowInCustomizationForm="True" VisibleIndex="6">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Lote" FieldName="NRO_LOTE" 
                    ShowInCustomizationForm="True" VisibleIndex="7">
                    <Settings AllowSort="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Quitar" ShowInCustomizationForm="True" 
                    VisibleIndex="0" Width="45px">
                    <DataItemTemplate>
                        <asp:ImageButton ID="btnQuitar" runat="server" 
                            CommandArgument='<%# Bind("ID") %>' CommandName="Quitar" 
                            ImageAlign="Middle" ImageUrl="~/Images/delete.png" />
                    </DataItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Cliente" FieldName="CLIENTE" 
                    ShowInCustomizationForm="True" VisibleIndex="9">
                    <HeaderStyle HorizontalAlign="Center" />
                </dx:GridViewDataTextColumn>
            </Columns>
            <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                CssPostfix="Office2010Blue">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <StylesPager>
                <PageNumber ForeColor="#3E4846">
                </PageNumber>
                <Summary ForeColor="#1E395B">
                </Summary>
            </StylesPager>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
        </dx:ASPxGridView>


                    <div style="clear:both;height:15px"></div>

                    <dx:ASPxButton ID="btnIniciar" runat="server" Text="Iniciar" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                        HorizontalAlign="Center" onclick="btnIniciar_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100px">
                        <Image Url="~/Images/clock_play.png">
                        </Image>
                    </dx:ASPxButton>

                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxRoundPanel>

        


        

        


        <br />
        <dx:ASPxPopupControl ID="popupConfirmacion" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
            HeaderText="Confirmacion" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="300px" AllowDragging="True" 
            ClientInstanceName="popupConfirmacion" CloseAction="None" EnableViewState="False" Modal="True" PopupHorizontalAlign="WindowCenter" 
            PopupVerticalAlign="WindowCenter">
            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
            </LoadingPanelImage>
            <HeaderStyle>
            <Paddings PaddingLeft="7px" />
            </HeaderStyle>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table>
    <tr>
        <td colspan="2">
        <center>
        Esta seguro de Iniciar el proceso de armado de vehiculos?
        </center>
        </td>
    </tr>

        <tr>
            <td colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td>
            <center>
                <dx:ASPxButton ID="btnSI" runat="server" Text="SI" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" ClientInstanceName="btnSI" OnClick="btnSI_Click">
                    <ClientSideEvents Click="function(s, e) {
	popupConfirmacion.Hide();
}" />
                </dx:ASPxButton>
            </center>
            </td>
            <td>
            <center>
                <dx:ASPxButton ID="btnNO" runat="server" Text="NO" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" AutoPostBack="False" ClientInstanceName="btnNO">
                    <ClientSideEvents Click="function(s, e) {
	popupConfirmacion.Hide();
}" />
                </dx:ASPxButton>
            </center>
            </td>
        </tr>

    </table>
    
    </dx:PopupControlContentControl>
</ContentCollection>
        </dx:ASPxPopupControl>


        <br />
        <dx:ASPxPopupControl ID="popupMsj" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
            HeaderText="Mensaje" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="300px" AllowDragging="True" ClientInstanceName="popupMsj" 
            EnableViewState="False" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
            </LoadingPanelImage>
            <HeaderStyle>
            <Paddings PaddingLeft="7px" />
            </HeaderStyle>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">

<table style="width: 273px">
<tr>
    <td>
    <center>
        <dx:ASPxLabel ID="lblMsj" runat="server" Text="">
        </dx:ASPxLabel>
    </center>
    </td>
</tr>
<tr>
<td>
<center>
    <dx:ASPxButton ID="btnMsj" runat="server" Text="Aceptar" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" ClientInstanceName="btnMsj">
        <ClientSideEvents Click="function(s, e) {
	popupMsj.Hide();
}" />
    </dx:ASPxButton>
</center>
</td>
</tr>
</table>


</dx:PopupControlContentControl>
</ContentCollection>
        </dx:ASPxPopupControl>


    </div>

</ContentTemplate>
</asp:UpdatePanel>

</asp:Content>
